{namespace n=Tx_News_ViewHelpers}
<f:layout name="General" />
<!--
	=====================
		Templates/News/List.html
-->

<f:section name="content">
	<f:if condition="{news}">
		<f:then>
			<f:if condition="{0:settings.archiveRestriction} == {0:'archived'}">
				<f:then>
					<div class="news-list-archive">
						<f:if condition="{settings.hidePagination}">
							<f:then>
								<div>
									<f:for each="{news}" as="newsItem">
										<f:render partial="Archive/Item" arguments="{newsItem: newsItem, settings:settings}" />
									</f:for>
								</div>
							</f:then>
							<f:else>
								<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.archive.paginate}">
									<div>
										<f:for each="{paginatedNews}" as="newsItem">
											<f:render partial="Archive/Item" arguments="{newsItem: newsItem, settings:settings}" />
										</f:for>
									</div>
								</n:widget.paginate>
							</f:else>
						</f:if>
					</div>
				</f:then>
				<f:else>
					<f:if condition="{0:settings.templateLayout} == {0:'latest_view'}">
						<f:then>
							<div class="news-list-view">
								<f:if condition="{settings.hidePagination}">
									<f:then>
										<div>
											<f:for each="{news}" as="newsItem">
												<f:render partial="Latest/Item" arguments="{newsItem: newsItem, settings:settings}" />
											</f:for>
										</div>
									</f:then>
									<f:else>
										<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}">
											<div>
												<f:for each="{paginatedNews}" as="newsItem">
													<f:render partial="Latest/Item" arguments="{newsItem: newsItem, settings:settings}" />
												</f:for>
											</div>
										</n:widget.paginate>
									</f:else>
								</f:if>
							</div>
						</f:then>
						<f:else>
							<div class="news-list-view">
								<f:if condition="{settings.hidePagination}">
									<f:then>
										<div>
											<f:for each="{news}" as="newsItem">
												<f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings}" />
											</f:for>
										</div>
									</f:then>
									<f:else>
										<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}">
											<div>
												<f:for each="{paginatedNews}" as="newsItem">
													<f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings}" />
												</f:for>
											</div>
										</n:widget.paginate>
									</f:else>
								</f:if>
							</div>
						</f:else>
					</f:if>
				</f:else>
			</f:if>
		</f:then>
		<f:else>
			<div class="no-news-found">
				<f:translate key="list_nonewsfound" />
			</div>
		</f:else>
	</f:if>
</f:section>
